package com.sh.data.engine.domain.base.model.enums;

import java.util.Objects;

/**
 * @author：jingchen.hr
 * @descripion:
 * @data:5/5/202210:35 AM
 */
public enum DirectoryMenuEnum {
    PARENT_DIR("0", "全部分组"),
    OFFLINE("offline", "离线同步"),
    ONLINE("online", "实时采集"),
    API("dataapi", "数据服务"),
    API_TAG("dataapitag", "数据服务标签");
    private String code;

    private String remark;

    public String getCode() {
        return this.code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getRemark() {
        return this.remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    DirectoryMenuEnum(String code, String remark) {
        this.code = code;
        this.remark = remark;
    }

    public static DirectoryMenuEnum valueOfCode(String des) {
        for (DirectoryMenuEnum directoryMenuEnum : values()) {
            if (Objects.equals(des, directoryMenuEnum.getCode())) {
                return directoryMenuEnum;
            }
        }
        return null;
    }
}
